home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 126-150 / scopedisk132 / redate / redate.docs < prev    next >
Text File  |  1995-03-19  |  3KB  |  49 lines

  1.   REDATE <directory name> V1.1 April 6/1990  Jim Butterfield
  2.   ------ ----------------
  3.        COPY ALL CLONE is a wonderful way of repacking a disk,
  4. copying a drawer, or transferring to hard disk.  BUT .. it copies
  5. only files, not directories, which are [.. created].  This means
  6. that the directories get TODAY as their date, rather than the
  7. date of the originally copied directory.
  8.        LIST should tell me what's old stuff and what's new.
  9. But for DIRs, the dates usually mislead on copied disks.
  10.  * * * * * * * * *
  11.        REDATE DF0: datestamps each subdirectory to a date
  12. matching its most recent contents.  Empty subdirectories will
  13. date to 01-Apr-78.  REDATE does all directory levels, from
  14. the bottom up to (not including) the specified level.
  15.        Any directory may be specified.  The basic intent is to
  16. handle root directories (DF0:, RAM:, RAD:, Workbench:) but it
  17. will work happily on any directory (FONTS:, DF0:DEVS, RAM:T).
  18. The NAMED directory will not be datestamped; in the case of a
  19. root directory, it can't be, and in other cases it would make
  20. the coding less readable.  So REDATE DF0:DEVS will datestamp
  21. DEVS/PRINTERS and DEVS/KEYMAPS but not DF0:DEVS itself.
  22.  
  23.        ....info files are ignored in terms of date information.
  24. The idea here is that such files are re-dated by such simple
  25. manipulations as moving an icon or resizing a window.  Their
  26. dates, carried up to the enclosing drawer, would mislead.
  27.  * * * * * * * * *
  28. Coding notes:  the program is PURE, but does anyone care when it's
  29. less than 2K in size?
  30.      SetFileDate does not exist as a DOS command, so a packet
  31. structure must be built and sent to DOS.  That's more work than
  32. usual, since a BSTR must be constructed of each subdirectory
  33. name, and two message ports are involved:  the one you send to,
  34. and the one on which you receive a reply.  The first must be
  35. "found" with DeviceProc; the second could be taken from the current
  36. process, but here is constructed (cf Sheppner, "New Packets...").
  37.      For this last, CreatePort (usually taken from amiga.lib) has
  38. been replaced by more organic code which fits in-line.  In fact,
  39. the MessagePort, Message, DosPacket, and BSTR work area are all
  40. tucked cozily together in a 216-byte block.
  41.      Coding has to be carefully recursive to allow scanning to any
  42. depth of subdirectory.  Variable LEVEL is not needed, but is there
  43. in case you want to work further on the code.
  44.  
  45.  
  46.      Note that this program supplies a RETURN code level, so that
  47. scripts may test whether things worked as hoped.
  48.                            --Jim B
  49.